API Documentation
ContentLoader.h
1 // ContentLoader.h
3 //
5 
6 namespace nkScripts
7 {
11  class DLL_SCRIPTS_EXPORT ContentLoader final
12  {
13  public :
14 
22  static nkExport::ExporterLoadResult inputData (const std::string_view& filePath) ;
29  static std::string inputDataStr (const std::string_view& filePath) ;
36  static nkExport::ExporterLoadResult inputDataSources (const std::string_view& sources) ;
45  static bool outputData (const std::string_view& content, const std::string_view& path) ;
46 
54  static bool saveTreeDeclaration (nkExport::Node* tree, const std::string_view& pathFromData) ;
62  static bool saveObjectDeclaration (nkExport::Exportable* object, const std::string_view& pathFromData) ;
63 
71  static ContentLoadResultScript loadScriptDeclaration (const std::string_view& pathFromData, bool loadResource = true) ;
79  static ContentLoadResultScript processScriptSources (const std::string_view& sources, bool loadResource = true) ;
87  static ContentLoadResultScript processScriptTree (nkExport::Node* tree, bool loadResource = true) ;
88  } ;
89 }
nkScripts::ContentLoader::outputData
static bool outputData(const std::string_view &content, const std::string_view &path)
nkScripts
Encompasses all API of component NilkinsScripts.
Definition: Environment.h:7
nkExport::Exportable
An interface to define objects that can be exported using this component.
Definition: Exportable.h:15
nkScripts::ContentLoadResult
Holds information about a content load attempt.
Definition: ContentLoadResult.h:23
nkScripts::ContentLoader::processScriptTree
static ContentLoadResultScript processScriptTree(nkExport::Node *tree, bool loadResource=true)
nkExport::ExporterLoadResult
Holds the information about a try to import data sources.
Definition: ExporterLoadResult.h:15
nkScripts::ContentLoader::inputData
static nkExport::ExporterLoadResult inputData(const std::string_view &filePath)
nkExport::Node
A node in the tree structure representing the data to export / import.
Definition: Node.h:42
nkScripts::ContentLoader
Allows to export and import content through their declaration files.
Definition: ContentLoader.h:12
nkScripts::ContentLoader::saveTreeDeclaration
static bool saveTreeDeclaration(nkExport::Node *tree, const std::string_view &pathFromData)
nkScripts::ContentLoader::processScriptSources
static ContentLoadResultScript processScriptSources(const std::string_view &sources, bool loadResource=true)
nkScripts::ContentLoader::loadScriptDeclaration
static ContentLoadResultScript loadScriptDeclaration(const std::string_view &pathFromData, bool loadResource=true)
nkScripts::ContentLoader::inputDataStr
static std::string inputDataStr(const std::string_view &filePath)
nkScripts::ContentLoader::inputDataSources
static nkExport::ExporterLoadResult inputDataSources(const std::string_view &sources)
nkScripts::ContentLoader::saveObjectDeclaration
static bool saveObjectDeclaration(nkExport::Exportable *object, const std::string_view &pathFromData)